package string;

public class IndexOfDemo {
    public static void main(String[] args) {
        String in = "thinking in java.";
        int index = in.indexOf("in");
        System.out.println(index);
        int index1 = in.indexOf("in",3);
        System.out.println(index1);
        int index2 = in.lastIndexOf("in");
        System.out.println(index2);
    }
}
